﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
using System.Collections.Specialized;
using fsw.Common;

namespace fsw.Web
{
    public partial class Default : Web.UI.ManagePage
    {
        protected Model.Admin admin_info;//管理员信息
        protected string _action = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            admin_info = GetAdminInfo();
            this._action = DTRequest.GetQueryString("action");
            if (this._action == "clearcache")
            {
                CacheHelper.ClearCache();
                Response.Write("更新缓存成功!");
                Response.End();
            }          
        }
        /// <summary>
        /// 退出登录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lbtnExit_Click(object sender, EventArgs e)
        {
            Session[DTKeys.SESSION_ADMIN_INFO] = null;
            Utils.WriteCookie("AdminName", "fsw", -14400);
            Utils.WriteCookie("AdminPwd", "fsw", -14400);
            Response.Redirect("login.aspx");
        }
    }
}